<!--
 * @Author: 18222335065 2369811390@qq.com
 * @Date: 2022-10-17 11:42:08
 * @LastEditors: 18222335065 2369811390@qq.com
 * @LastEditTime: 2022-10-17 14:37:36
 * @FilePath: \hey\HeyTea_project\HeyTea-ui\src\pages\admin\order\List.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <!-- 订单管理表格部分 -->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="所有订单" name="allList">
        <Order />
      </el-tab-pane>
      <el-tab-pane label="待支付" name="unPaid">
        <Order :status="status" />
      </el-tab-pane>
      <el-tab-pane label="待派单" name="unSend">
        <Order :status="status" />
      </el-tab-pane>
      <el-tab-pane label="待接单" name="unReceive">
        <Order :status="status" />
      </el-tab-pane>
      <el-tab-pane label="待服务" name="unService">
        <Order :status="status" />
      </el-tab-pane>
      <el-tab-pane label="待确认" name="unConfirm">
        <Order :status="status" />
      </el-tab-pane>
      <el-tab-pane label="已完成" name="finishList">
        <Order :status="status" />
      </el-tab-pane>
    </el-tabs>
    <!-- 订单管理表格部分 -->

  </div>
</template>

<script>
import Order from '@/pages/components/OrderList.vue'
export default {
  components: { Order },
  data() {
    return {
      activeName: 'allList',
      // 父组件传递给子组件的值
      status: ''
    }
  },
  methods: {
    handleClick(tab, event) {
      // console.log(tab,'llll', event);
      this.status = event.target.innerHTML
    }
  }
}
</script>
